<template>
  <div class="login-wrap">
    <div class="left-context">
      <img
        src="../assets/img/undraw_forgot_password_re_hxwm_1.png"
        alt=""
        class="login-img"
      />
    </div>
    <div class="right-context">
      <div class="context-text">重置密码</div>
      <div class="context-login">
        <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
          <!-- 账号 -->
          邮箱
          <el-form-item prop="email">
            <el-input
              v-model="ruleForm.email"
              style="margin-top: 5px"
            ></el-input>
          </el-form-item>

          <el-form-item style="width: 100%">
            <el-button size="medium" type="primary" class="send-btn" @click="sendReset"
              >发送</el-button
            >
          </el-form-item>
        </el-form>
      </div>
      <div class="jump-register">
        你已有账号?
        <el-button type="text" style="margin-right: 20px" @click="loginForm"
          >用户登录</el-button
        >
        建立新账号?
        <el-button type="text" @click="registerForm">用户注册</el-button>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data: function () {
    return {
      flag: false,
      ruleForm: {
        email: "",
      },
      rules: {
        email: [{ required: true, message: "请输入邮箱", trigger: "blur" }],
      },
    };
  },
  methods: {
    loginForm() {
      this.$router.push("/");
    },
    registerForm() {
      this.$router.push("/register");
    },
    sendReset() {
      this.$router.push("/resetpwdtwo");
    }
  },
};
</script>
<style scoped>
.login-wrap {
  width: 1024px;
  height: 600px;
  margin: 6% 0 0 20%;
  background-color: #fff;
}
.login-img {
  width: 390px;
  height: 240px;
  margin: 180px 0 0 120px;
}
.left-context {
  float: left;
  width: 512px;
  height: 600px;
  background-color: #9a9aeb;
}
.right-context {
  position: relative;
  float: right;
  width: 512px;
  height: 600px;
}
.context-text {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  margin-top: 140px;
}
.context-login {
  position: absolute;
  width: 350px;
  height: 150px;
  margin-left: 95px;
  margin-top: 40px;
}
.send-btn {
  width: 100%;
  background-color: #1e1e1e;
  border-radius: 5px;
  margin-top: 20px;
}
.jump-register {
  margin: 200px 0 0 110px;
  font-size: 14px;
}
</style>
